import java.util.*;
import java.util.HashMap;

import java.util.HashMap;
import java.util.Hashtable;
import java.util.LinkedHashMap;
import java.util.Properties;
import java.util.TreeMap;
import java.util.WeakHashMap;

public class maps {
	
	public static void main(String[] args) {
Map<String,student1> studenthasmap =new HashMap<String,student1>();
		
		/*Map hasmap=new HashMap();
		Map hastable=new Hashtable();
		Map linkedhasmap =new LinkedHashMap();
		Map properties =new Properties();
		Map treemap=new TreeMap();
		hasmap.put("title","pirates");
		hasmap.put("director","gore");
		hasmap.put("lead director","johny");
		hasmap.put("writer","ted");
		
		hastable.put("title","pirates");
		hastable.put("director","gore");
		hastable.put("lead director","johny");
		hastable.put("writer","ted");
		
		linkedhasmap.put("title","pirates");
		linkedhasmap.put("director","gore");
		linkedhasmap.put("lead director","johny");
		linkedhasmap.put("writer","ted");
		
		properties.put("title","pirates");
		properties.put("director","gore");
		properties.put("lead director","johny");
		properties.put("writer","ted");
	
        
		treemap.put("title","pirates");
		treemap.put("director","gore");
		treemap.put("lead director","johny");
		treemap.put("writer","ted");
		
		*/
		studenthasmap.put("1001",new student1(1001,"sachin"));
		studenthasmap.put("1000",new student1(1000,"praveen"));
		studenthasmap.put("1004",new student1(1004,"gururaj"));
		System.out.println(studenthasmap.get("1000"));
		
	/*	System.out.println("iterating:hasmap");
		Iterator hasmapkey=hasmap.keySet().iterator();
		Iterator hasmapkeyvalues=hasmap.values().iterator();
		while(hasmapkey.hasNext()){
			System.out.println(hasmapkey.next() +": "  + hasmapkeyvalues.next());
		}
		
		System.out.println("iterating:hastable");
		Iterator hastablekey=hastable.keySet().iterator();
		Iterator hastablekeyvalues=hastable.values().iterator();
		while(hastablekey.hasNext()){
			System.out.println(hastablekey.next() +": "  + hastablekeyvalues.next());
		}
		
		
		System.out.println("iterating:linkedhasmap");
		Iterator linkedhasmapkey=linkedhasmap.keySet().iterator();
		Iterator linkedhasmapkeyvalues=linkedhasmap.values().iterator();
		while(linkedhasmapkey.hasNext()){
			System.out.println(linkedhasmapkey.next() +": "  + linkedhasmapkeyvalues.next());
		}
		System.out.println("iterating:properties\n");
		Iterator propertieskey=properties.keySet().iterator();
		Iterator propertiesvalues=properties.values().iterator();
		while(propertieskey.hasNext()){
			System.out.println(propertieskey.next() +": "  + propertiesvalues.next());
		}
		
		
		System.out.println("iterating:treemap\n");
		Iterator treemapkey=treemap.keySet().iterator();
		Iterator treemapkeyvalues=treemap.values().iterator();
		while(treemapkey.hasNext()){
			System.out.println(treemapkey.next() +": "  + treemapkeyvalues.next());
		}*/
	}

}
